package ynu.edu.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import ynu.edu.entity.User;

@FeignClient(name = "provider-service")
public interface ServiceProviderService {
    @GetMapping("user/getUserById/{userId}")
    User getUserById(@PathVariable("userId") Integer userId);

    @PostMapping("user/createUser")
    User createUser(@RequestBody User user);

    @PutMapping("user/updateUser")
    User updateUser(@RequestBody User user);

    @DeleteMapping("user/deleteUser/{userId}")
    String deleteUser(@PathVariable("userId") Integer userId);
}
